/**
 * 我的子弹
 */
var BaseBullet = require('./../BaseBullet');
var EnumIE = require('../../Enum/EnumIE');
cc.Class(
{
    extends: BaseBullet,

    properties:
    {

    },

    // LIFE-CYCLE CALLBACKS:

    onLoad()
    {
        this._super();
    },

    doAction()
    {
        var actArray = [cc.moveBy(1, cc.v2(0, cc.winSize.height)),
            cc.callFunc(function()
            {
                this.node.destroy();
            }.bind(this))
        ];
        var seq = cc.sequence(actArray);
        this.node.runAction(seq);
    },
    onCollisionEnter: function(other)
    {

        var baseBodyIE = this._super(other);
        if (null == baseBodyIE)
        {
            return;
        }
        if (EnumIE.E == baseBodyIE.getEnumIE())
        {
            this.node.destroy();
        }

    },
});